"""MedicalProject URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path

# from medical import views
from medical.views import hospital, users, main_department, sub_department

urlpatterns = [
    # 医院表
    path('hos/list/', hospital.hos_list),
    path('hos/add/', hospital.hos_add),
    path('hos/<int:nid>/edit/', hospital.hos_edit),
    path('hos/<int:nid>/delete/', hospital.hos_delete),

    # 用户表
    path('users/list/', users.users_list),
    path('users/add/', users.users_add),
    path('users/<int:nid>/edit/', users.users_edit),
    path('users/<int:nid>/delete/', users.users_delete),

    # 主科室表
    path('main_dep/list/', main_department.main_dep_list),
    path('main_dep/add/', main_department.main_dep_add),
    path('main_dep/<int:nid>/edit/', main_department.main_dep_edit),
    path('main_dep/<int:nid>/delete/', main_department.main_dep_delete),

    # 次科室表
    path('sub_dep/list/', sub_department.sub_dep_list),
    path('sub_dep/add/', sub_department.sub_dep_add),
    path('sub_dep/<int:nid>/edit/', sub_department.sub_dep_edit),
    path('sub_dep/<int:nid>/delete/', sub_department.sub_dep_delete),

]
